package org.cars.db.service;

import io.quarkus.hibernate.orm.PersistenceUnit;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import jakarta.persistence.EntityManager;
import org.cars.db.entity.second_db.Country;

@ApplicationScoped
public class CountyService {
    @Inject
    @PersistenceUnit("second_db")
    EntityManager entityManager;

    public Country getSingle(Integer id) {
        return entityManager.find(Country.class, id);
    }
}